/**
 * @param {String} url 地址参数
 */
export function parseQuery(url: string) {
  let q: Record<string, any> = {};
  url.replace(/([^?&=]+)=([^&]+)/g, (_, k, v) => (q[k] = v));
  return q;
}
